'''
使用time、datetime包
'''
import time
import datetime

now_time = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
print(f'打印今天的日期时间：{now_time}')

now_time = time.strftime('%Y-%m-%d%H%M%S', time.localtime())
print(f'打印今天的日期时间：{now_time}')

now_time = time.strftime('%Y-%m-%d', time.localtime())
print(f'打印今天的日期：{now_time}')

today = datetime.date.today()
print(f'打印今天的日期：{now_time}')

today = datetime.date.today()
yesterday = today - datetime.timedelta(days=1)
print(f'打印昨天的日期：{yesterday}')

today = datetime.date.today()
tomorrow = today + datetime.timedelta(days=1)
print(f'打印明天的日期：{tomorrow}')

today = datetime.date.today()
mb_day = today - datetime.timedelta(days=60)
print(f'打印从今天往前算两个月的时间：{mb_day}')